package com.idealighter.game.core.dao.generate.mapper;

import com.idealighter.game.core.dao.generate.domain.TransferGoldRecordDomain;
import com.idealighter.game.core.dao.generate.domain.TransferGoldRecordDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface TransferGoldRecordDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=TransferGoldRecordDomainSqlProvider.class, method="countByExample")
    long countByExample(TransferGoldRecordDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @DeleteProvider(type=TransferGoldRecordDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(TransferGoldRecordDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Delete({
        "delete from transfer_gold_record",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Insert({
        "insert into transfer_gold_record (type, opposite_type, ",
        "player_id, player_super_id, ",
        "player_name, opposite_player_id, ",
        "opposite_super_id, opposite_player_name, ",
        "before_safe_gold, after_safe_gold, ",
        "fee, fee_rate, change_safe_gold, ",
        "create_time, player_type, ",
        "channel_id)",
        "values (#{type,jdbcType=TINYINT}, #{oppositeType,jdbcType=TINYINT}, ",
        "#{playerId,jdbcType=BIGINT}, #{playerSuperId,jdbcType=BIGINT}, ",
        "#{playerName,jdbcType=VARCHAR}, #{oppositePlayerId,jdbcType=BIGINT}, ",
        "#{oppositeSuperId,jdbcType=BIGINT}, #{oppositePlayerName,jdbcType=VARCHAR}, ",
        "#{beforeSafeGold,jdbcType=BIGINT}, #{afterSafeGold,jdbcType=BIGINT}, ",
        "#{fee,jdbcType=BIGINT}, #{feeRate,jdbcType=INTEGER}, #{changeSafeGold,jdbcType=BIGINT}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{playerType,jdbcType=TINYINT}, ",
        "#{channelId,jdbcType=VARCHAR})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(TransferGoldRecordDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @InsertProvider(type=TransferGoldRecordDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(TransferGoldRecordDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=TransferGoldRecordDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="opposite_type", property="oppositeType", jdbcType=JdbcType.TINYINT),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="player_super_id", property="playerSuperId", jdbcType=JdbcType.BIGINT),
        @Result(column="player_name", property="playerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="opposite_player_id", property="oppositePlayerId", jdbcType=JdbcType.BIGINT),
        @Result(column="opposite_super_id", property="oppositeSuperId", jdbcType=JdbcType.BIGINT),
        @Result(column="opposite_player_name", property="oppositePlayerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="before_safe_gold", property="beforeSafeGold", jdbcType=JdbcType.BIGINT),
        @Result(column="after_safe_gold", property="afterSafeGold", jdbcType=JdbcType.BIGINT),
        @Result(column="fee", property="fee", jdbcType=JdbcType.BIGINT),
        @Result(column="fee_rate", property="feeRate", jdbcType=JdbcType.INTEGER),
        @Result(column="change_safe_gold", property="changeSafeGold", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="player_type", property="playerType", jdbcType=JdbcType.TINYINT),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR)
    })
    List<TransferGoldRecordDomain> selectByExample(TransferGoldRecordDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Select({
        "select",
        "id, type, opposite_type, player_id, player_super_id, player_name, opposite_player_id, ",
        "opposite_super_id, opposite_player_name, before_safe_gold, after_safe_gold, ",
        "fee, fee_rate, change_safe_gold, create_time, player_type, channel_id",
        "from transfer_gold_record",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="opposite_type", property="oppositeType", jdbcType=JdbcType.TINYINT),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="player_super_id", property="playerSuperId", jdbcType=JdbcType.BIGINT),
        @Result(column="player_name", property="playerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="opposite_player_id", property="oppositePlayerId", jdbcType=JdbcType.BIGINT),
        @Result(column="opposite_super_id", property="oppositeSuperId", jdbcType=JdbcType.BIGINT),
        @Result(column="opposite_player_name", property="oppositePlayerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="before_safe_gold", property="beforeSafeGold", jdbcType=JdbcType.BIGINT),
        @Result(column="after_safe_gold", property="afterSafeGold", jdbcType=JdbcType.BIGINT),
        @Result(column="fee", property="fee", jdbcType=JdbcType.BIGINT),
        @Result(column="fee_rate", property="feeRate", jdbcType=JdbcType.INTEGER),
        @Result(column="change_safe_gold", property="changeSafeGold", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="player_type", property="playerType", jdbcType=JdbcType.TINYINT),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR)
    })
    TransferGoldRecordDomain selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=TransferGoldRecordDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") TransferGoldRecordDomain record, @Param("example") TransferGoldRecordDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=TransferGoldRecordDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") TransferGoldRecordDomain record, @Param("example") TransferGoldRecordDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=TransferGoldRecordDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(TransferGoldRecordDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_gold_record
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Update({
        "update transfer_gold_record",
        "set type = #{type,jdbcType=TINYINT},",
          "opposite_type = #{oppositeType,jdbcType=TINYINT},",
          "player_id = #{playerId,jdbcType=BIGINT},",
          "player_super_id = #{playerSuperId,jdbcType=BIGINT},",
          "player_name = #{playerName,jdbcType=VARCHAR},",
          "opposite_player_id = #{oppositePlayerId,jdbcType=BIGINT},",
          "opposite_super_id = #{oppositeSuperId,jdbcType=BIGINT},",
          "opposite_player_name = #{oppositePlayerName,jdbcType=VARCHAR},",
          "before_safe_gold = #{beforeSafeGold,jdbcType=BIGINT},",
          "after_safe_gold = #{afterSafeGold,jdbcType=BIGINT},",
          "fee = #{fee,jdbcType=BIGINT},",
          "fee_rate = #{feeRate,jdbcType=INTEGER},",
          "change_safe_gold = #{changeSafeGold,jdbcType=BIGINT},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "player_type = #{playerType,jdbcType=TINYINT},",
          "channel_id = #{channelId,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(TransferGoldRecordDomain record);
}